import requests
import json

url = "https://fanyi.baidu.com/sug"
text = input("请输入：")
data = {
    "kw": text
}
response = requests.post(url=url, data=data)
with open("./baidu.json", "w", encoding="utf-8") as f:
    f.write(str(response.json()))
jsonpath = response.json()
print(jsonpath)
